<%@page import="factory.ServiceFactory"%>
<%@page import="domain.Zkl"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";//因为用了服务器端跳转；所以这边要重定向一下path；保证js和css可以正确载入

	List<Zkl> zkls = ServiceFactory.getSerInstance().getAllZkls();
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>进货</title>
<link rel="shortcut icon" href="common/YI.jpg" />
<link href="common/css/bootstrap.min.css" rel="stylesheet">
<link href="common/css/datepicker3.css" rel="stylesheet">
<link href="common/css/bootstrap-table.css" rel="stylesheet">
<link href="common/css/styles.css" rel="stylesheet">
<link href="common/css/mystyle.css" rel="stylesheet">
<link href="common/css/tips.css" rel="stylesheet">

<!--[if lt IE 9]>
<script src="common/js/html5shiv.js"></script>
<script src="common/js/respond.min.js"></script>
<![endif]-->

</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#"><span>YI书屋</span>Admin</a>
			</div>

		</div>
		<!-- /.container-fluid -->
	</nav>

	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">
				<span>&nbsp;</span>
			</div>
		</form>
		<ul class="nav menu">
			<li><a href="home.html"><span
					class="glyphicon glyphicon-list-alt"></span> 收银</a></li>
			<li><a href="charts.html"><span
					class="glyphicon glyphicon-stats"></span> 统计</a></li>
			<li class="active"><a href="goods.do"><span
					class="glyphicon glyphicon-pencil"></span> 进货</a></li>
			<li><a href="list.html"><span
					class="glyphicon glyphicon-list"></span> 清单</a></li>
			<li><a href="zk.do"><span
					class="glyphicon glyphicon-dashboard"></span> 折扣</a></li>
			<li role="presentation" class="divider"></li>
			<li><span>&nbsp;</span></li>
		</ul>
		<div class="attribution">
			Template by <a href="JavaScript:void(0);">lc1416302550@163.com</a>
		</div>
	</div>
	<!--/.sidebar-->

	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
				<li class="active">进货</li>
			</ol>
		</div>
		<!--/.row-->

		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">进货</h1>
			</div>
		</div>
		<!--/.row-->


		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">新货表单</div>
					<div class="panel-body" style="border-bottom: 1px solid #eee;">
						<div class="col-md-6">
							<div class="form-group">
								<input id="txm" class="form-control" placeholder="1.扫描条形码">
							</div>
							<div class="form-group">
								<input id="dj" class="form-control" placeholder="2.单价：￥">
							</div>
							<div class="form-group">
								<input id="name" class="form-control" placeholder="3.品名">
							</div>
						</div>
						<div class="col-md-6">
							<div class="form-group">
								<label>4.折扣类</label> <select id="zkSelector"
									class="form-control">
									<%
										for (int i = 0, l = zkls.size(); i < l; i++) {
									%>
									<option value="<%=zkls.get(i).getId()%>"><%=zkls.get(i).getTitle()%></option>
									<%
										}
									%>
								</select>
							</div>
							<div class="form-group">
								<label>余数：<span id="rest">0</span></label> <input id="sl"
									class="form-control" placeholder="5.新添数量">
							</div>
						</div>
					</div>
					<div class="panel-footer " style="text-align: right;">
						<input type="button" id="addGB" class="btn btn-primary mybtn"
							value="上货" /> <input type="button" id="qxGB"
							class="btn btn-default mybtn" value="取消" />
					</div>
				</div>
			</div>
		</div>
		<!--/.row-->


	</div>
	<!--/.main-->

	<script src="common/js/jquery-1.11.1.min.js"></script>
	<script src="common/js/bootstrap.min.js"></script>
	<script src="common/js/chart.min.js"></script>
	<script src="common/js/easypiechart.js"></script>
	<script src="common/js/bootstrap-datepicker.js"></script>
	<script src="common/js/bootstrap-table.js"></script>
	<script>
		!function($) {
			$(document)
					.on(
							"click",
							"ul.nav li.parent > a > span.icon",
							function() {
								$(this).find('em:first').toggleClass(
										"glyphicon-minus");
							});
			$(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function() {
			if ($(window).width() > 768)
				$('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function() {
			if ($(window).width() <= 767)
				$('#sidebar-collapse').collapse('hide')
		})
	</script>
	<script src="common/js/tips.js"></script>
	<script src="common/js/goods.js"></script>
</body>

</html>